import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home/Home.vue'

Vue.use(VueRouter)

const routes = [{
        path: '/home',
        name: 'Home',
        component: Home
    },
    {
        path: '/find',
        name: 'Find',
        component: () =>
            import ('../views/Find/Find.vue') //按需引入
    }, {
        path: '/category',
        name: 'Category',
        component: () =>
            import ('../views/Category/Category.vue') //按需引入
    }, {
        path: '/cart',
        name: 'Cart',
        component: () =>
            import ('../views/Cart/Cart.vue') //按需引入
    }, {
        path: '/mine',
        name: 'Mine',
        component: () =>
            import ('../views/Mine/Mine.vue') //按需引入
    }
]

const router = new VueRouter({
    routes
})

export default router